
import { createRouter, createWebHistory } from 'vue-router'

//4 :定义路由配置规则
const routes = [
    {
        path: "/",
        name: "index",
        component: () =>
            import ("@/views/PugIndex.vue")
    },
    {
        path: "/login",
        name: "login",
        component: () =>
            import ("@/views/Login.vue")
    }
]

//2 :创建路由对象
const router = createRouter({
    // 引入访问模式
    history: createWebHistory(),
    routes
})

// 3: 导出即可生效
export default router;